<?php require VIEW_PATH."/header.php";?>
<body>
<link rel="stylesheet" href="Public/org/kindeditor/themes/default/default.css" />
<script src="Public/org/kindeditor/kindeditor.js"></script>
<script src="Public/org/kindeditor/lang/zh_CN.js"></script>
<script src="<?php echo __VIEW__?>/Goods/js.js"></script>
<link rel="stylesheet" href="<?php echo __VIEW__?>/Goods/css.css" />
	<form method="post" enctype="multipart/form-data">
<input type="hidden" name="goods_id" value="<?php echo $field['goods_id']?>">
    <div class="hd-tab">
      <ul class="hd-tab-menu">
        <li lab="base" class="active">
          <a> 基本设置 </a>
        </li>
        <li lab="pics">
          <a>商品图集 </a>
        </li>
        <li lab="attribute">
          <a>商品属性</a>
        </li>
        <li lab="service">
          <a>商品详情</a>
        </li>
      </ul>
      <div class="hd-tab-content">
        <div lab="base" class="hd-tab-area">
          <table class="hd-table hd-table-form hd-form">
            <thead>
              <tr>
                <td colspan="2">添加商品</td>
              </tr>
            </thead>
            <tbody>
              <tr>
                <th>父级</th>
                <td>
                 <select name="cat_id">
                   <?php foreach ($catData as $v){?>
                   <option value="<?php echo $v['cat_id']?>"
                   <?php if($v['cat_id']==$field['cat_id']){?>
                
                  selected
                  
               <?php }?> 
                  ><?php echo $v['_name']?></option>
                   <?php }?>
                 </select>
               </td>
             </tr>
             <tr>
              <th>商品名称</th>
              <td>
                <input type="text" name="goods_name" value="<?php echo $field['goods_name']?>" class="hd-w300">
              </td>
            </tr>
            <tr>
              <th>货号</th>
              <td>
                <input type="text" name="goods_sn" value="<?php echo $field['goods_sn']?>" class="hd-w300">
              </td>
            </tr>
            <tr>
              <th>单位</th>
              <td>
                <input type="text" name="unit" value="<?php echo $field['unit']?>" class="hd-w300">
              </td>
            </tr>
            <tr>
              <th>品牌</th>
              <td>
               <select name="brand_id">
                 <?php foreach ($brandData as $v){?>
                 <option value="<?php echo $v['id']?>"
                  <?php if($v['id']==$field['brand_id']){?>
                
                  selected
                  
               <?php }?> 
                  ><?php echo $v['name']?></option>
                 <?php }?>
               </select>
             </td>
           </tr>
         </tr>
         <tr>
          <th>点击数</th>
          <td>
            <input type="text" name="click" value="<?php echo $field['click']?>" class="hd-w300">
          </td>
        </tr>
        <tr>
          <th>列表页图</th>
          <td>
          <?php if($field['list_pic']){?>
                
          <img src="<?php echo $field['list_pic']?>" style="width:50px;">
          <input type="hidden" name="list_pic" value="<?php echo $field['list_pic']?>">
          
               <?php }?>
            <input type="file" name="list_pic" class="hd-w300">
          </td>
        </tr>
        <tr>
          <th>缩略图</th>
          <td>
          <?php if($field['thumb_pic']){?>
                
          <img src="<?php echo $field['thumb_pic']?>" style="width:50px;">
          <input type="hidden" name="thumb_pic" value="<?php echo $field['thumb_pic']?>">
          
               <?php }?>
            <input type="file" name="thumb_pic" class="hd-w300">
          </td>
        </tr>
        <tr>
          <th>栏目关键词</th>
          <td>
            <input type="text" name="keyword" value="<?php echo $field['keyword']?>" class="hd-w300">
          </td>
        </tr>
        <tr>
          <th>栏目描述</th>
          <td>
            <textarea name="description" class="hd-w300 hd-h100"><?php echo $field['description']?></textarea>
          </td>
        </tr>
        
      </tbody>
    </table>
  </div>
  <!-- 图集 -->
  <div lab="pics" class="hd-tab-area">
    <ul class="picsList">
        <?php foreach ($pics as $p){?>
        <li id="pic<?php echo $p['id']?>">
            <img src="<?php echo $p['small_pic']?>" style="width:100px;">
            <span onclick="delPic(<?php echo $p['id']?>)">x</span>
        </li>
        <?php }?>
    </ul>
     <table id="pics">
      <tr>
        <td>
          <input type="file" name="pics[]"><span onclick="addPic(this)">[+]</span>
        </td>
      </tr>
    </table>
  </div>
  <!-- end图集 -->
  <!-- 服务 -->
  <div lab="attribute" class="hd-tab-area">

  </div>
  <!-- end服务 -->
  <!-- 服务 -->
  <div lab="service" class="hd-tab-area">
     <table class="hd-table hd-table-form hd-form">
      <tr>
        <th class="hd-w100">商品详情</th>
        <td>
          <textarea id="content" name="content" style="width:700px;height:300px;"><?php echo $field['content']?></textarea>
          <script>
            KindEditor.ready(function(K) {
                    window.editor = K.create('#content');
            });
          </script>
        </td>
      </tr>
      <tr>
        <th>售后服务</th>
        <td>
          <textarea id="service" name="service" style="width:700px;height:300px;"><?php echo $field['service']?></textarea>
          <script>
            KindEditor.ready(function(K) {
                    window.editor = K.create('#service');
            });
          </script>
        </td>
      </tr>
    </table>
  </div>
  <!-- end服务 -->
</div>
<button class="hd-btn hd-btn-primary">提交</button>
</div>

</form>

</body>
</html>










